import router from "@/router";
import axios from "axios";

//请求拦截
axios.interceptors.request.use(config=>{
    if(localStorage.getItem("token")){
        config.headers["Authorization"]=localStorage.getItem('token');//赋值到表头
    }
    return config;
},error=>{
  return  Promise.reject(error)
});